/*
 * @Author: your name
 * @Date: 2021-07-22 11:37:15
 * @LastEditTime: 2021-11-05 14:41:13
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jinfeng_up\src\API\feedBack\server.js
 */
import Api from './api.js'
import request from '@/utils/request'
import fileDownload from '@/utils/fileDownload.js'

// 反馈总览
export const FeedBack = {
    GetPageAsync(_data) {
        return request.post(Api.GetPageAsync, _data)
    },
    getBackLogPageAsync(_data) {
        return request.post(Api.getBackLogPageAsync, _data)
    },
    DeleteAsync(_data) {
        return request.get(Api.DeleteAsync, {
            params: _data
        })
    },
    UnBindBug(_data) {
        return request.get(Api.UnBindBug, {
            params: _data
        })
    },
    UnBindStory(_data) {
        return request.get(Api.UnBindStory, {
            params: _data
        })
    },
    FeedBackGetSystemLogsAsync(_data) {
        return request.get(Api.FeedBackGetSystemLogsAsync, {
            params: _data
        })
    },
    OperationAsync(_data) {
        return request.post(Api.OperationAsync, _data)
    },

    InsertAsync(_data) {
        return request.post(Api.InsertAsync, _data)
    },

    GetLoadAsync(_data) {
        return request.get(Api.GetLoadAsync, {
            params: _data
        })
    },

    UpdateAsync(_data) {
        return request.post(Api.UpdateAsync, _data)
    },

    ProInsertAsync() {
        return request.get(Api.ProInsertAsync)
    },

    GetListItemAsync(_data) {
        return request.get(Api.GetListItemAsync, {
            params: _data
        })
    },

    FormOptionGetListItemAsync(_data) {
        return request.get(Api.FormOptionGetListItemAsync, {
            params: _data
        })
    },

    GetSingleLoadAsync(_data) {
        return request.get(Api.GetSingleLoadAsync, {
            params: _data
        })
    },
    validationFeedBackNumber(_data) {
        return request.get(Api.validationFeedBackNumber, {
            params: _data
        })
    },

    DraftUpdateAsync(_data) {
        return request.post(Api.DraftUpdateAsync, _data)
    },

    GetAllUserAsync() {
        return request.get(Api.GetAllUserAsync)
    },
    GetStageListAsync(_data) {
        return request.get(Api.GetStageListAsync, {
            params: _data
        })
    },
    GetListChildrenAsync(_data) {
        return request.get(Api.GetListChildrenAsync, {
            params: _data
        })
    },
    ExportAsync(_data) {
        fileDownload.fileDownload('POST', Api.ExportAsync, _data)
    },
    LinkFeedBackOperationAsync(_data) {
        return request.post(Api.LinkFeedBackOperationAsync, _data)
    },

    synchronousInsertAsync() {
        return request.get(Api.synchronousInsertAsync)
    },

    SaveFieldAsync(_data) {
        return request.post(Api.SaveFieldAsync, _data)
    },
    GetLoadFiledAsync() {
        return request.get(Api.GetLoadFiledAsync)
    },
    GetFeedCloseReason() {
        return request.get(Api.GetFeedCloseReason)
    },
    TaskGetByFeedBackNumber(_id) {
        return request.get(Api.TaskGetByFeedBackNumber + _id)
    },
    getBugDetail(_id) {
        return request.get(Api.getBugDetail + _id)
    },
    getStoryDetail(_id) {
        return request.get(Api.getStoryDetail + _id)
    },
    FeedBackGetRelevanceFeedbacAsync(_data) {
        return request.get(Api.FeedBackGetRelevanceFeedbacAsync, {
            params: _data
        })
    },
    associateBugOrStory(bugOrStoryId, feedBackNumber, type) {
        return request.get(Api.associateBugOrStory + bugOrStoryId + '/' + feedBackNumber + '/' + type)
    },
    UserGetUserInfoAsync() {
        return request.get(Api.UserGetUserInfoAsync)
    },

    GetFeedBackAgency(serious) {
        return request.get(Api.GetFeedBackAgency + serious)
    },

    /* 禅道 */

    // 禅道定制化
    GetCustomFlagList() {
        return request.get(Api.GetCustomFlagList)
    },

    // 禅道用户
    GetListAllUser() {
        return request.get(Api.GetListAllUser)
    },

    // 根据产品Id获取产品详情
    GetProductInfo(_data) {
        return request.get(Api.GetProductInfo, { params: _data })
    },
    FeedBackBindingJudgeAsync(_data) {
        return request.get(Api.FeedBackBindingJudgeAsync, { params: _data })
    },

    // 禅道 所属计划
    GetListProductPlan(_data) {
        return request.get(Api.GetListProductPlan, { params: _data })
    },

    // 禅道 所属模块
    GetModuleList(_data) {
        return request.get(Api.GetModuleList, { params: _data })
    },

    // 禅道 优先级
    GetPriList() {
        return request.get(Api.GetPriList)
    },

    // 禅道 需求来源
    GetSourceList() {
        return request.get(Api.GetSourceList)
    },

    // 禅道 紧急程度

    GetUrgentList() {
        return request.get(Api.GetUrgentList)
    },

    // 禅道 所属模块
    GetProjectList(_data) {
        return request.get(Api.GetProjectList, { params: _data })
    },
    //  禅道 转需求

    ChangeStory(_data) {
        return request.post(Api.ChangeStory, _data)
    },

    //  禅道  转Bug
    ChangeBug(_data) {
        return request.post(Api.ChangeBug, _data)
    },

    // 禅道  发现阶段
    GetBugDiscoveryStageList() {
        return request.get(Api.GetBugDiscoveryStageList)
    },

    // 禅道  BUG类型
    GetBugTypeList() {
        return request.get(Api.GetBugTypeList)
    },
    // 禅道  严重程度
    GetBugSeverityList() {
        return request.get(Api.GetBugSeverityList)
    },

    // 禅道  影响版本

    GetVersionByProductAndProjectList(_data) {
        return request.get(Api.GetVersionByProductAndProjectList, { params: _data })
    },

    // 禅道  产品分支
    GetProductBranchList(_data) {
        return request.get(Api.GetProductBranchList, { params: _data })
    },

    // 禅道  BUG来源
    GetBugOsList() {
        return request.get(Api.GetBugOsList)
    },

    // 根据反馈Id获取转Bug
    GetChangeBugByFeedBack(_data) {
        return request.get(Api.GetChangeBugByFeedBack, { params: _data })
    },

    // 根据反馈Id获取转需求
    GetChangeStoryByFeedBack(_data) {
        return request.get(Api.GetChangeStoryByFeedBack, { params: _data })
    },

    // 获取反馈超期信息
    GetFeedBackOverTime(_data) {
        return request.get(Api.GetFeedBackOverTime + '/' + _data)
    },

    // 申请上会

    ApplyMeeting(_data) {
        return request.post(Api.ApplyMeeting, _data)
    },

    // 持续处理
    Pocessing(_data) {
        return request.post(Api.Pocessing, _data)
    },

    // 获得阶段
    GetFeedBackStage(_id) {
        return request.get(Api.GetFeedBackStage + _id)
    },

    GetModuleUserList(_data) {
        return request.post(Api.GetModuleUserList, _data)
    },
    ZinTaoUpload(_data) {
        return request.post(Api.ZinTaoUpload, _data)
    },

    // 相关会议
    AboutMeeting(_data) {
        return request.post(Api.AboutMeeting + _data)
    },

    // 相关时长
    GetRelevantTimeAsync(_data) {
        return request.get(Api.GetRelevantTimeAsync, { params: _data })
    },

    // 所有产品
    GetAllProductAsync() {
        return request.get(Api.GetAllProductAsync)
    },

    // 版本号下拉
    GetVersionList() {
        return request.get(Api.GetVersionList)
    },
    // 根据当前登陆人获取产品列表
    getProductListByCurrentUser() {
        return request.get(Api.getProductListByCurrentUser)
    }
}
